Release 10.1A: OpenEdge Getting Started:
Object-oriented Programming
Defining an interface
Interfaces are used to enforce the definition of a set of methods that a class must provide if the class definition implements a specified interface. A class can implement zero or more interfaces. Interfaces provide a way for a class to satisfy the requirements of more than one set of behaviors while only being able to inherit a single set of behavior from its super class. If the behavior represents a set of methods that other objects need to invoke, but for which there is no common implementation, an interface provides a reliable way of defining a uniform contract for all implementations to satisfy. Any caller can count on a set of methods and their signatures being defined in a uniform way, even though the interface implementation might differ completely from one class to another.
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |